package day04;

import java.util.Random;

public class GenEx06 {                                                  //抽奖金
    public static void main(String[] args) {
        int[] ranarr = ranArr();
        int[] moneyArr={2,588,888,1000,10000};
        for (int i = 0; i < ranarr.length; i++) {
            System.out.println(moneyArr[ranarr[i]]+"元的奖金被抽出");
        }
    }
    public static int[] ranArr(){
        int[] arr={0,1,2,3,4};
        Random rand=new Random();
        for (int i = 0; i < 100; i++) {
            int a=rand.nextInt(5);
            int b=rand.nextInt(5);
            int temp=arr[a];
            arr[a]=arr[b];
            arr[b]=temp;
        }
        return arr;
    }
}
